#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int N;
    cin >> N;
    int base = 1;
    while(N/(base*10) > 0)
        base = base * 10;
    while (N >= 10)
    {
        cout << N/base  << "   ";
        N = N % base;
        base = base / 10;
    }
    cout <<N%10;
}